package com.hzy.orderSystem.service.impl;

import com.github.pagehelper.Page;
import com.hzy.orderSystem.dao.OrderDao;
import com.hzy.orderSystem.entities.Order;
import com.hzy.orderSystem.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 小宝
 * @create 2021/4/17 10:33
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    OrderDao orderDao;

    @Override
    public int save(Order order) {
        return orderDao.save(order);
    }

    @Override
    public Order getRecords(Long id) {
        return orderDao.getRecords(id);
    }

    @Override
    public Page<Order> getOrders(Long uid, Long sid, List<Integer> status) {
        return orderDao.getOrders(uid, sid, status);
    }

    @Override
    public int updateOrder(Order order) {
        return orderDao.updateOrder(order);
    }
}
